<%@ page contentType="text/html;charset=UTF-8" pageEncoding="utf-8" trimDirectiveWhitespaces="true" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="my" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<fmt:message var="title" key="account.edit"/>
<my:layout title="${title}">
    <jsp:attribute name="body">

        <form:form method="post" action="${pageContext.request.contextPath}/account/update" modelAttribute="account">
            <form:hidden path="id"/>
            <form:hidden path="login"/>
            <fieldset><legend>
                    <c:if test="${account.id > 0}"><fmt:message key="account.edit.edit"/></c:if> 
                    <c:if test="${account.id < 1}"><fmt:message key="account.edit.create"/></c:if>
                    </legend>
            <table>
                <tr>
                    <th><form:label path="password"><fmt:message key="account.password"/></form:label></th>
                    <td><form:input type="password" path="password" maxlength="20"/></td>
                    <td><form:errors path="password" cssClass="error"/></td>
                </tr>
                <tr>
                    <td> <input type="submit" value="<fmt:message key='account.admin'/>" name="adm"></td>
                    <td> <input type="submit" value="<fmt:message key='account.employee'/>" name="empl"></td>
                    <td> <input type="submit" value="<fmt:message key='account.courier'/>" name="cour"></td>
                </tr>
            </table>
        </fieldset>
    </form:form>
</jsp:attribute>
</my:layout>